#!/usr/bin/env python
# -*- coding: utf-8 -*-
import gtk
#import gnomeapplet
import gobject
#import logging
import time
from gettext import gettext as _
from gnomeagenda.appointment import *
#LOGGER = logging.getLogger(__name__)
from pkg_resources import Requirement, resource_filename

GLADEFILE = resource_filename("gnomeagenda","gnome-agenda.glade")
class EditEventWindow(gtk.Dialog):
	myevent = None
	
	def __init__(self, parent, event = None):
		if(not event):
			event = CalEvent()
		self.myevent = event
			
		gtk.Dialog.__init__(self, _("Appointment - %s" % event.title),parent,
						  	gtk.DIALOG_DESTROY_WITH_PARENT,
						  	   (gtk.STOCK_SAVE, gtk.RESPONSE_ACCEPT, gtk.STOCK_CANCEL,gtk.RESPONSE_REJECT))
		wTree = gtk.glade.XML(GLADEFILE)
		
		table = wTree.get_widget("editDlgTable")

		table.reparent(self.child)
		
		table.show_all()
		self.child.set_child_packing(table,False,False,10,gtk.PACK_START)
		if(not event):
			return
		
		#there is an event we want to edit, set the values from the event
	